package com.hotelvip.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 封装日志信息的实体类
 * @author Lzh
 * @date 2020/11/30 15:46
 */
@Data
@TableName("sys_logs")
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "logs对象",description ="日志对象Syslog" )
public class SysLog extends BasePojo{
	/**日志记录id*/
	@TableId(type = IdType.AUTO)
	@ApiModelProperty(value = "日志id",name = "id",dataType = "Long")
	private Long id;
	/**用户名(谁的操作日志-这个用户为操作这个系统的登陆用户)*/
	@ApiModelProperty(value = "用户名",name = "username",example = "zhangsan")
	private String username;
	/**ip地址*/
	@ApiModelProperty(value = "ip地址",name = "ip",example = "127.0.0.1")
	private String ip;
	/**用户执行的这个操作的操作名*/
	@ApiModelProperty(value = "执行的操作",name = "operation")
	private String operation;
	/**记录用户访问的方法的全限定名(包名+类名+方法)*/
	@ApiModelProperty(value = "执行的方法",name = "method",example = "包名+类名+方法")
	private String method;
	/**记录用户访问方法时传入的参数*/
	@ApiModelProperty(value = "传入的参数",name = "params",example = "json")
	private String params;
	/**用户访问方法时的执行时长*/
	@ApiModelProperty(value = "用时",name = "time",example = "10000单位是秒",dataType = "Long")
	private Long time;
	/**记录这条记录的创建时间*/
//	@ApiModelProperty(value = "记录创建时间",name = "createdTime",example = "yyyy-MM-dd HH:mm:ss",dataType = "date")
//	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//	private Date createdTime;
	//...
}
